/**
 * Copyright (c) 2020-2021 浦东大爷 All rights reserved.
 * 机会永远都是留给有准备的人
 */
package com.job.moudle3.task5;

import java.util.Objects;

/**
 * @author: gitwo
 * @date: 2020-11-23
 * @description:扑克类，定义顺序和牌面，id从小到大存放牌从大到小
 */
public class Pok {
    private int id;
    private String pok;

    public int getId() {
        return id;
    }

    public String getPok() {
        return pok;
    }

    public Pok() {
    }

    public Pok(int id, String pok) {
        this.id = id;
        this.pok = pok;
    }

    @Override
    public String toString() {
        return pok;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Pok pok = (Pok) o;
        return id == pok.id;
    }

    @Override
    public int hashCode() {
        return Objects.hash(id);
    }
}
